package kr.hkit.PowerJava.chapter11;
class Std extends Student{
	


}


public class Student {
	private int stdNum;
	private String stdName;

	public Student(){}
	public Student(int stdNum, String stdName) {
		this.stdNum = stdNum;
		this.stdName = stdName;

	}
    
	public void add(){
		
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Student) {
			return stdNum == ((Student) obj).stdNum;
		} else {

		}
		return false;
	}

	public static void main(String[] args) {
		Student std01 = new Student(1, "김태희");
		Student std02 = new Student(1, "김태희");
		System.out.println(std01.equals(std02) ? "같다" : "다르다");
	}

}
